import { ReactFlow, useNodesState } from "@xyflow/react";
import SwitchNode from "./SwitchNode";
import "@xyflow/react/dist/style.css";
const nodeTypes = {
  SwitchNode,
};
const initialNodes = [
  {
    id: "1",
    type: "SwitchNode",
    data: {
      status: "on",
    },
    position: { x: 100, y: 200 },
  },
];
function Flow() {
  const [nodes, , onNodesChange] = useNodesState(initialNodes);
  return (
    <ReactFlow
      colorMode="dark"
      nodes={nodes}
      nodeTypes={nodeTypes}
      onNodesChange={onNodesChange}
      fitView
    />
  );
}

export default Flow;
